#include<stdio.h>
#include<string.h>
int is_zuoxuan(char arr1[], char arr2[])
{
	int i = 0;
	int len = strlen(arr1);
	for (i = 0; i < len; i++);
	{
		char tmp = arr1[0];
		int j = 0;
		for (j = 0; j < len-1; j++)
		{
			arr1[j] = arr1[j + 1];

		}
		arr1[len - 1] = tmp;
		if (strcmp(arr1, arr2) == 0)
		{
			return 1;
		}
	}
	 return 0;
}
int main()
{
	//int arr[100001] = { 0 };
	//scanf("%d", &arr);
	//int i = 0;
	//scanf("%d", i);
	char arr1[] = "abcdef";
	char arr2[] = "cdefab";

	int ret=is_zuoxuan(arr1, arr2);
	if (ret == 1)
	{
		printf("ok");
	}
	else
	{
		printf("no" );
	}

	return 0;
}